package io.easyspring.common.generator;

import io.easyspring.common.generator.generator.Generator;

/**
 * 主启动类
 *
 * @author summer
 * DateTime 2018-12-13 14:36
 * @version V1.0.0-RELEASE
 */
//@SpringBootApplication
public class CommonGeneratorApplication {

//    public static void main(String[] args) {
//        SpringApplication.run(CommonGeneratorApplication.class, args);
//    }

    /** 表前缀 */
    private static final String[] STRATEGY_CONFIG_TABLE_PREFIX =
            {"credit", "cust", "loan", "log", "msg", "post", "prov", "sys", "tool", "activiti"};
    //{"credit", "customer", "loan", "logger", "message", "post", "provider", "system", "tools"};

    /** 想要生成的表 */
    private static final String[] STRATEGY_CONFIG_INCLUDE =
//            {"activiti_task_form"};

    // 授信模块
//            {"credit_credit_capacity", "credit_credit_check_file",
//                    "credit_credit_enhancement", "credit_credit_file",
//            "credit_credit_info", "credit_due_diligence"};

    // 客户模块
//            {"cust_base_account", "cust_customer",
//                    "cust_customer_file", "cust_customer_project",
//                    "cust_financial_report", "cust_general_account",
//                    "cust_master", "cust_passenger_source",
//                    "cust_qualification_info", "cust_relevancy_user",
//                    "cust_subsidiary"
//            };

    // 借款模块
//            {"loan_insurance_application", "loan_loan_capital",
//            "loan_loan_enhancement_agency", "loan_loan_info",
//            "loan_remittance"};

    // 日志模块
//            {"log_business_log", "log_server_log"};

    // 消息模块
//            {"msg_email_log", "msg_message_template", "msg_text_message_log"};

    // 贷后模块
//            {"post_capital_repayment", "post_capital_repayment_plan", "post_legal_feedback",
//            "post_post_loan", "post_settlement"};

    // 供应者模块
//            {"prov_capital", "prov_capital_rule", "prov_enhancement_agency"};

    // 系统模块
            {"sys_user", "sys_role", "sys_permission", "sys_user_role", "sys_role_permission"};

    // 工具模块
//            {"tool_dictionary", "tool_pcc", "tool_user_file"};

    /**
     * 启动生成的 main 方法
     *
     * Author summer
     * DateTime 2018-12-13 16:14
     * @param args main 的参数
     * Version V1.0.0-RELEASE
     */
    public static void main(String[] args) {

        // 创建生成对象
        Generator generator = new Generator();
        generator.generator(STRATEGY_CONFIG_TABLE_PREFIX, STRATEGY_CONFIG_INCLUDE,
                "/basis-rbac", "rbac",
                "/io/easyspring/basis", "io.easyspring.basis");
        // 执行生成
//        generator.generator();
    }

}

